#include "stdio.h"
#include "stdint.h"

int main(void)
{
    uint8_t buf[100] = {0};
    uint8_t cs = 0;
    uint16_t a,b,c;
    a = 10000;
    b = 7220;
    c = 6678;
    buf[0] = 0xAA;
    buf[1] = 0xAA;
    buf[2] = 0x81;
    buf[3] = 0x06;
    buf[4] = (a >> 8) & 0xFF;
    buf[5] = a & 0xFF;
    buf[6] = (b >> 8) & 0xFF;
    buf[7] = b & 0xFF;
    buf[8] = (c >> 8) & 0xFF;
    buf[9] = c & 0xFF;
    for(int i = 2; i < 10; i++)
    {
        cs += buf[i];
    }
    buf[10] = cs;
    buf[11] = 0xFF;
    buf[12] = 0xFF;
    for(int i = 0; i < 13; i++)
    {
        printf("%02X ", buf[i]);
    }



}
